import os, threading

class sshStatusThread(threading.Thread):  # 继承父类threading.Thread
    def __init__(self,e, outport ):
        threading.Thread.__init__(self)
        self.e = e
        self.outport = outport

    def run(self):  # 把要执行的代码写到run函数里面 线程在创建后会直接运行run函数
        print(self.e.__str__())
        # python解释器绝对路径(读取事先设置好的python家目录)
        JainaPython = os.getenv('JainaPython').replace('\\', '\\\\')
        JainaPython = JainaPython + "python.exe"
        os.system(JainaPython + " .\\tools\\sshStatus.py -e " + self.e.__str__() + " -o " + self.outport.__str__())
